#include <iostream>
#include <cmath>
using namespace std;

bool prime(long long n) {
    bool isit = true;
    for (int i = 2; i<= n/2; ++i)
        if (n % i == 0) {
            isit = false;
            break;
        }
    return isit;
}

int main() { 
    for (int i = 2; i<=10000; ++i)
        if (prime(i)) cout << i << " ";
    return 0;
}
